package ${(generator.basePackageName)!""}.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
<#list columns as row>
<#if row.columnName == 'is_deleted' || row.columnName == 'deleted'>
import com.baomidou.mybatisplus.annotation.TableLogic;
</#if>
</#list>
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;


/**
 * ${generator.tableComment} 表结构
 *
 * @author ${generator.author}
 * @version 0.0.1
 * @date ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 * @since ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Builder
@TableName(value = "${generator.tableName}")
public class ${generator.className}DO extends Model<${generator.className}DO> implements Serializable {

	private static final long serialVersionUID = 1L;

		<#list columns as row>
	/**
	 * ${row.columnComment}
	 */
			<#if row.columnKey == 'PRI'>
	@TableId<#if row.extra == 'auto_increment'>(type=IdType.AUTO)</#if>
			</#if>
			<#if row.columnName == 'create_time'>
	@TableField(fill=FieldFill.INSERT)
			</#if>
			<#if row.columnName == 'update_time'>
	@TableField(fill=FieldFill.INSERT_UPDATE)
			</#if>
			<#if row.columnName == 'is_del' || row.columnName == 'deleted'>
	@TableField(fill=FieldFill.INSERT)
			</#if>
			<#if row.columnName == 'is_del' || row.columnName == 'deleted'>
	@TableLogic
			</#if>
	private ${row.javaType} ${row.javaName};

		</#list>
<#--	<#else>-->
<#--	</#if>-->
}
